#include "footHelicopter.h"
#include "../framework.h"

/*Vertexf FootHelicopter::vertices[]={Vertexf(-8,15),Vertexf(8,15),Vertexf(-3,10),
                           Vertexf(-8,15),Vertexf(3,10), Vertexf(8,15)};*/
Vertexf FootHelicopter::vertices[]={Vertexf(-9,15),Vertexf(9,15),
                            Vertexf(9,13),Vertexf(-9,13),
                            Vertexf(-3,10),Vertexf(-6,13),Vertexf(-5,13),Vertexf(-2,10),
                            Vertexf(3,10),Vertexf(6,13),Vertexf(7,13), Vertexf(4,10)};

FootHelicopter::FootHelicopter(Rectangle rec)
	:SceneObject(rec){
	this->objVertices.vertices = vertices;
	objVertices.nVertices=nVertices;
}

FootHelicopter::~FootHelicopter(){}


void FootHelicopter::draw(){
	Framework& fr = Framework::instance();
	fr.pipeline.pushMatrix();
        Colorf oldColor = fr.pipeline.getLineColor();
        fr.pipeline.setLineColor(Colorf(0.7f,0.75f,0.7f));
        fr.pipeline.draw(Pipeline::POLYGON,this->objVertices.vertices,4);
        fr.pipeline.draw(Pipeline::POLYGON,&this->objVertices.vertices[4],4);
        fr.pipeline.draw(Pipeline::POLYGON,&this->objVertices.vertices[8],4);
        fr.pipeline.setLineColor(oldColor);
	fr.pipeline.popMatrix();
}



